<?php
include_once 'isLogin.php';
$table_name='company_product';
//删除
	if($_GET['action']=='del'){
		echo $commonc->del($table_name,$_POST['id']);
		exit();
	}
//修改
	if($_GET['action']=='edit'){
		$arr = array($key_index[$_POST['index']]=>$_POST['value']);
		echo $commonc->update($table_name,$arr,"id='".$_POST['value_id']."'");
		exit();
	}



$reset=$commonc->getInfo('admin',$_COOKIE['admin_id']);

 //var_dump($reset['company_id']);
 $sql=$table_name." where company_id=".$reset['company_id'];
 $res=$commonc->getList($sql);
 
 
$smarty->assign('res',$res['result']);
$smarty->display($_filename.".html");